home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 6: Level 6 / 17 Bit - Level 6 (1998)(Epic Marketing)[!].iso / quartz / q0429.dms / q0429.adf / etc / rsconvert / Makefile.SH < prev    next >
Makefile  |  1991-08-08  |  2KB  |  60 lines

  1. case $CONFIG in
  2. '')
  3.     if test ! -f config.sh; then
  4.     ln ../config.sh . || \
  5.     ln ../../config.sh . || \
  6.     ln ../../../config.sh . || \
  7.     (echo "Can't find config.sh."; exit 1)
  8.     fi
  9.     . config.sh
  10.     ;;
  11. esac
  12. : This forces SH files to create target in same directory as SH file.
  13. : This is so that make depend always knows where to find SH derivatives.
  14. case "$0" in
  15. */*) cd `expr X$0 : 'X\(.*\)/'` ;;
  16. esac
  17. echo "Extracting etc/rsconvert/Makefile (with variable substitutions)"
  18. : This section of the file will have variable substitutions done on it.
  19. : Move anything that needs config subs from !NO!SUBS! section to !GROK!THIS!.
  20. : Protect any dollar signs and backticks that you do not want interpreted
  21. : by putting a backslash in front.  You may delete these comments.
  22. $spitshell >Makefile <<!GROK!THIS!
  23. OPTIMIZE = $optimize
  24. CCFLAGS = $ccflags $large
  25. CC = $cc
  26. MKDEP = $mkdep
  27. YACC = $yacc
  28. !GROK!THIS!
  29.  
  30. : In the following dollars and backticks do not need the extra backslash.
  31. $spitshell >>Makefile <<'!NO!SUBS!'
  32. LIBRAYDIR = ../../libray
  33. INCLUDE = -I$(LIBRAYDIR) -I../../
  34. CFLAGS = $(CCFLAGS) $(INCLUDE) $(OPTIMIZE)
  35. LIBS =
  36. YFLAGS = -d
  37.  
  38. CFILES = main.c yacc.c lex.c
  39. OBJS = $(CFILES:.c=.o)
  40. DEPENDSRC = main.c yacc.y lex.l
  41.  
  42. rsconvert: $(OBJS)
  43.     $(CC) $(CFLAGS) -o rsconvert $(OBJS) $(LIBS)
  44.  
  45. depend:
  46.     (sed '/^# DO NOT DELETE THIS LINE/q' Makefile && \
  47.      $(MKDEP) $(DEPENDSRC) | sed 's/: \.\//: /; /\/usr\/include/d' \
  48.     ) >Makefile.new
  49.     cp Makefile Makefile.bak
  50.     cp Makefile.new Makefile
  51.     rm -f Makefile.new
  52.  
  53. clean:
  54.     /bin/rm -f y.tab.h $(OBJS) lex.c
  55.  
  56. # DO NOT DELETE THIS LINE
  57. !NO!SUBS!
  58. chmod 755 Makefile
  59. $eunicefix Makefile
  60.